﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MainFrame
{
    public partial class TipForm : Form
    {
        public TipForm(string msg)
        {
            InitializeComponent();
            
            tip = msg;
        }
        private string tip;
       

        
       

        private void TipForm_Load(object sender, EventArgs e)
        {
            rbx_Msg.Text = tip;
            this.Refresh();
            button1.Focus();
            this.TopMost = true;
            timer1.Start();
        }

        private void btn_NG_Click(object sender, EventArgs e)
        {
            GlobalVar.IsTipNG = true;
            this.Close();
        }

        private void btn_OK_Click(object sender, EventArgs e)
        {
            GlobalVar.IsTipOK = true;
            this.Close();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            button1.BackColor = button1.BackColor == Color.Green ? Color.LightGray : Color.Green;
        }

        private void TipForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            timer1.Stop();
        }
    }
}
